package com.vimi8.ebb.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * Created by think on 2016/12/16.
 */
@ApiModel("服务收藏dto")
public class ServiceCollectionDTO {


    private String id;
    private String title;//标题
    private String createTime;//创建时间
    private String releasePerson;//发布人
    private String images;//图片

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    /**
     * 服务标题
     * @return
     */
    @ApiModelProperty("标题")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    /**
     * 发布人
     * @return
     */
    @ApiModelProperty("发布人")
    public String getReleasePerson() {
        return releasePerson;
    }

    public void setReleasePerson(String releasePerson) {
        this.releasePerson = releasePerson;
    }

    /**
     * 图片
     * @return
     */
    @ApiModelProperty("图片")
    public String getImages() {
        return images;
    }

    public void setImages(String images) {
        this.images = images;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ServiceCollectionDTO that = (ServiceCollectionDTO) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (title != null ? !title.equals(that.title) : that.title != null) return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (releasePerson != null ? !releasePerson.equals(that.releasePerson) : that.releasePerson != null)
            return false;
        return images != null ? images.equals(that.images) : that.images == null;

    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (title != null ? title.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (releasePerson != null ? releasePerson.hashCode() : 0);
        result = 31 * result + (images != null ? images.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "ServiceCollectionDTO{" +
                "id='" + id + '\'' +
                ", title='" + title + '\'' +
                ", createTime='" + createTime + '\'' +
                ", releasePerson='" + releasePerson + '\'' +
                ", images='" + images + '\'' +
                '}';
    }

    public ServiceCollectionDTO() {
    }

    public ServiceCollectionDTO(String id, String title, String createTime, String releasePerson, String images) {

        this.id = id;
        this.title = title;
        this.createTime = createTime;
        this.releasePerson = releasePerson;
        this.images = images;
    }
}
